var { appHelper, timeHelper } = require("../helper");

Wang.main = function () {
  var appNames = [
    "喜番免费短剧",
    "袋鼠点点短视频",
    "百度畅听版",
    "西瓜视频",
    "百度极速版",
  ];
  var length = appNames.length;
  for (var index = 0; index < length; index++) {
    var appName = appNames[index];
    var openSuccess = appHelper.launchApp(appName);
    if (openSuccess) {
      console.log(`${appName}成功，将看${min}分钟`);
    } else {
      console.log(`${appName}失败，将看${min}分钟`);
    }
    var min = timeHelper.random(1, 3);
    sleep(min * 60 * 1000);
    appHelper.launchApp("auto");
    sleep(2 * 1000);
  }
};
